package com.lishilin.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lishilin.common.utils.PageUtils;
import com.lishilin.gulimall.product.entity.CategoryEntity;
import com.lishilin.gulimall.product.vo.CateLog2VO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author lishilin
 * @email 1871907207@qq.com
 * @date 2021-04-19 15:52:13
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //查询分类，以树形结构返回
    List<CategoryEntity> listWithTree();


    void removeMenuByIds(List<Long> asList);

    /**
     * 找到catelogId的完整路径，根据商品分类的id找到其完整路径
     * 【父/子/孙】
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Cagegorys();

    Map<String, List<CateLog2VO>> getCatalogJson();
}

